package com.wonders.framework.web.context;

import javax.servlet.ServletContext;

import org.springframework.context.ApplicationContext;

/**
 * 全局上下文
 * 
 * @author WuBin
 * 
 */
public class GlobalContext {

	/**
	 * servlet上下文
	 */
	private static ServletContext servletContext;

	/**
	 * spring容器上下文
	 */
	private static ApplicationContext applicationContext;

	public static ServletContext getServletContext() {
		return servletContext;
	}

	public static ApplicationContext getApplicationContext() {
		return applicationContext;
	}

	public static void setServletContext(ServletContext servletContext) {
		GlobalContext.servletContext = servletContext;
	}

	public static void setApplicationContext(
			ApplicationContext applicationContext) {
		GlobalContext.applicationContext = applicationContext;
	}

}
